﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Kugar.Core.Log.Interface
{
    public interface ILoggerFactory
    {
        /// <summary>
        ///     获取默认的日志记录器
        /// </summary>
        /// <returns></returns>
        ILogger GetLogger();

        /// <summary>
        ///     获取指定名称的日志记录器
        /// </summary>
        /// <param name="loggerName">日志记录器的名称</param>
        /// <returns></returns>
        ILogger GetLogger(string loggerName);
    }

    public interface ILogger
    {

        #region "Debug"

        void Debug(string message);

        void Debug(string message, params object[] args);

        void Debug(string message, IFormatProvider formatProvider, params object[] args);

        #endregion

        #region “Trace”

        void Trace(string message);

        void Trace(string message, params object[] args);

        void Trace(string message, IFormatProvider formatProvider, params object[] args);

        #endregion

        #region “Warn”

        void Warn(string message);

        void Warn(string message, params object[] args);

        void Warn(string message, IFormatProvider formatProvider, params object[] args);

        #endregion

        #region “Error”

        void Error(string message);

        void Error(string message, params object[] args);

        void Error(string message, IFormatProvider formatProvider, params object[] args);

        #endregion

        /// <summary>
        ///     是否输出Debug类型的消息
        /// </summary>
        bool IsDebugEnable { set; get; }

        bool IsTraceEnable { set; get; }

        bool IsWarnEnable { set; get; }

        bool IsErrorEnable { set; get; }
    }
}
